/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package com.persistencia.domain;

import java.io.Serializable;
import java.util.Date;
import javax.persistence.*;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;

/**
 *
 * @author SHERLY
 */
@Entity
@Table(name = "alumno")
@NamedQueries({
    @NamedQuery(name = "Alumno.findAll", query = "SELECT a FROM Alumno a"),
    @NamedQuery(name = "Alumno.findByNAluId", query = "SELECT a FROM Alumno a WHERE a.nAluId = :nAluId"),
    @NamedQuery(name = "Alumno.findByNPrsId", query = "SELECT a FROM Alumno a WHERE a.nPrsId = :nPrsId"),
    @NamedQuery(name = "Alumno.findByVCodigo", query = "SELECT a FROM Alumno a WHERE a.vCodigo = :vCodigo"),
    @NamedQuery(name = "Alumno.findByDtFchIngreso", query = "SELECT a FROM Alumno a WHERE a.dtFchIngreso = :dtFchIngreso"),
    @NamedQuery(name = "Alumno.findByVEstado", query = "SELECT a FROM Alumno a WHERE a.vEstado = :vEstado")})
public class Alumno implements Serializable {
    private static final long serialVersionUID = 1L;
    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    @Basic(optional = false)
    @NotNull
    @Column(name = "nAluId")
    private Integer nAluId;
    @Basic(optional = false)
    @NotNull
    @Column(name = "nPrsId")
    private int nPrsId;
    @Size(max = 9)
    @Column(name = "vCodigo")
    private String vCodigo;
    @Column(name = "dtFchIngreso")
    @Temporal(TemporalType.DATE)
    private Date dtFchIngreso;
    @Size(max = 1)
    @Column(name = "vEstado")
    private String vEstado;

    public Alumno() {
    }

    public Alumno(Integer nAluId) {
        this.nAluId = nAluId;
    }

    public Alumno(Integer nAluId, int nPrsId) {
        this.nAluId = nAluId;
        this.nPrsId = nPrsId;
    }

    public Integer getNAluId() {
        return nAluId;
    }

    public void setNAluId(Integer nAluId) {
        this.nAluId = nAluId;
    }

    public int getNPrsId() {
        return nPrsId;
    }

    public void setNPrsId(int nPrsId) {
        this.nPrsId = nPrsId;
    }

    public String getVCodigo() {
        return vCodigo;
    }

    public void setVCodigo(String vCodigo) {
        this.vCodigo = vCodigo;
    }

    public Date getDtFchIngreso() {
        return dtFchIngreso;
    }

    public void setDtFchIngreso(Date dtFchIngreso) {
        this.dtFchIngreso = dtFchIngreso;
    }

    public String getVEstado() {
        return vEstado;
    }

    public void setVEstado(String vEstado) {
        this.vEstado = vEstado;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (nAluId != null ? nAluId.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof Alumno)) {
            return false;
        }
        Alumno other = (Alumno) object;
        if ((this.nAluId == null && other.nAluId != null) || (this.nAluId != null && !this.nAluId.equals(other.nAluId))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "com.persistencia.domain.Alumno[ nAluId=" + nAluId + " ]";
    }
    
}
